const path = require('path');

function resolve(dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    lintOnSave: true,
    chainWebpack: (config) => {
        config.resolve.alias
            .set('@net', resolve('./src/network'))
    },
    devServer: {
        proxy: {
            '/api': {
                target: 'http://localhost:8000/', // 接口域名
                ws: true,
                secure: false, // 如果是https接口，需要配置这个参数
                changeOrigin: true, //是否跨域             
            }
        }
    }
}